-
Notifications
You must be signed in to change notification settings - Fork 16
Allow for pretty-printing of namelist array variables in log file. #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… into namelist_array_log
jimmielin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nusbaume!
peverwhee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one tiny optional thing
cime_config/create_readnl_files.py
Outdated
|
|
||
| ofile.comment("Print out namelist values", 3) | ||
| ofile.write("if (debug_output >= DEBUGOUT_INFO) then", 3) | ||
| msg = f"Namelist values from {grpname} for {self.scheme}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not critical at all, but maybe a slightly clearer message?
| msg = f"Namelist values from {grpname} for {self.scheme}" | |
| msg = f"Namelist values from group '{grpname}' for scheme '{self.scheme}'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super-critical change made. Thanks for the suggestion!
Tag name (required for release branches):
Originator(s): nusbaume
Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
This PR allows for the "pretty-printing" of namelist variables in the SIMA log file that are arrays. Originally the variables were printed in an entirely un-formatted way, which could make it difficult to read. Now array variables are printed to the log like so:
The PR also removes a non-varying property in the namelist reader generation code, adds the
iomsgoutput to the actual read calls, and now only writes the namelist variable values to the log if the logging level is greater than the minimum.Fixes #450
Describe any changes made to build system: Modifications were made to the namelist reader generation routine.
Describe any changes made to the namelist: No changes to the namelist files themselves (just the generated
readnlroutines).List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A
List all files eliminated and why: N/A
List all files added and what they do: N/A
List all existing files that have been modified, and describe the changes:
(Helpful git command:
git diff --name-status development...<your_branch_name>)M cime_config/create_readnl_files.py
log_infovariable.M src/control/runtime_opts.F90
M test/unit/python/sample_files/namelist_files/banana_namelist.F90
M test/unit/python/sample_files/namelist_files/kumquat_namelist.F90
M test/unit/python/test_create_readnl_files.py
If there are new failures (compared to the
test/existing-test-failures.txtfile),have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?
derecho/intel/aux_sima: ALL PASS excluding expected
multitapefailure.derecho/gnu/aux_sima: ALL PASS
If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:
CAM-SIMA date used for the baseline comparison tests if different than latest: